from robot.api import logger
from robotlibcore import keyword

import time
from datetime import datetime

class TimeLib(object):
    
    def __init__(self):
        self.t = time.time()

    @keyword('Get Now Time')
    def get_time_year_month(self):
        
        year = datetime.now().year
        month = datetime.now().month
        return year, month
    
    @keyword('Get timestrap')
    def get_timestrap(self):
        
        return int(self.t)